<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link rel="stylesheet" type="text/css" href="extjs4.1/resources/css/ext-all.css"/>
<script type="text/javascript" src="extjs4.1/bootstrap.js"></script>
<script type="text/javascript">
	Ext.onReady(function(){
		/*Ext.MessageBox.alert('hello world!','This is my first ExtJs!',function(){
			alert('closed');
		},this);
		
		Ext.MessageBox.confirm('hello world!','This is my first ExtJs!',function(btn){
			if(btn == "yes"){
				alert('yes');
			}else if(btn == "cancel"){
				alert('close');
			}else if(btn == "no"){
				alert('no');
			}
		},this);
		
		Ext.MessageBox.prompt('hello world!','This is my first ExtJs!',function(btn,mess){
			alert(mess);
		},this,true,'请输入留言');
		
		Ext.MessageBox.wait('请等待','处理中...',this);*/
		
		
		
		var timer = Ext.MessageBox.show({
			title:'当前时间',
			width:'300',
			height:'400',
			msg:'时间是：',
			buttons:Ext.Msg.YESNO,
			fn:function(btn){
				if(btn == "yes"){
					Ext.TaskManager.stop(t);
				}
			}
		});
		var t = {
			run:function(){
				timer.updateText('当前时间是:' + Ext.util.Format.date(new Date(),'Y-m-d g:i:s a'));
			},
			interval:1000
		}
		Ext.TaskManager.start(t);
	});
</script>
</head>
<body>

</body>
</html>